<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="x-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

<div class="container-fluid x-container has-x-sidemenu">

  <ol class="x-breadcrumb breadcrumb">
    <li class="active">提现管理&nbsp;-&nbsp;提现记录</li>
  </ol>

  <div class="x-content-layout has-operation">

    <div class="x-operation-bar no-margin no-bottom-border clearfix">
      <div class="x-operation-group pull-right">
        <a href="${ctx.host}/withdrawal-records/search" data-target="#search" data-toggle="modal" class="btn x-btn x-btn-blue"> <i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;筛选
        </a>
      </div>
    </div>

    <table class="table table-hover x-table">
      <thead>
        <tr>
          <th>序号</th>
          <th>用户</th>
          <th>提现金额</th>
          <th>提现标题</th>
          <th>支付时间</th>
          <th>状态</th>
        </tr>
      </thead>
      <tbody>
      <c:forEach var="userWithdrawal" items="${userWithdrawals}" varStatus="status">
      <tr>
        <td>${status.index+1}</td>
        <td>${userWithdrawal.user.mobile}-${userWithdrawal.user.nickname}</td>
        <td><fmt:formatNumber value="${userWithdrawal.balance/100}" pattern="#.##" /></td>
        <td>${userWithdrawal.content}</td>
        <td><fmt:formatDate value="${userWithdrawal.payTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
        <c:if test="${userWithdrawal.paid}">
        <td>已支付</td>
        </c:if>
        <c:if test="${!userWithdrawal.paid}">
        <td>未支付</td>
        </c:if>
      </tr>
      </c:forEach>
      </tbody>
      <tfoot>
      <tr>
          <td colspan="6" class="no-vertical-padding">
            <div class="pull-left">
              <jsp:include page="/WEB-INF/include/page.jsp">
              <jsp:param name="url" value="${ctx.host}/withdrawal-records" />
              <jsp:param name="queryString" value="${queryString}" />
              </jsp:include>
            </div>
          </td>
      </tr>
      </tfoot>
   </table>

  </div>
</div>
     
<%@ include file="/WEB-INF/include/footer.jsp"%>
<%@ include file="/WEB-INF/include/script.jsp"%>
<d:resource root="${ctx.resource}/build" type="script" src="js/page/bonus/withdrawal-records-list.js" />
<script type="text/javascript">
        require(['page/bonus/withdrawal-records-list'], function(page) {
            page.init();
        })
    </script>
</body>
</html>